package com.geekaca.news.service;

import cn.hutool.core.util.PageUtil;
import cn.hutool.db.PageResult;
import com.geekaca.news.domain.News;
import com.geekaca.news.domain.NewsTag;

import java.util.List;

public interface NewsService {
    public List<News> selectNewsAndCategory();

    public List<News> getAllNews();

    public News selectNewsAndCommentById(Long id);

    News getById(Long newsID);

    public List<News> blurSearchByTitleContent(News news);

    Integer getTotalNews();

    Integer getAllNewsCount(String keyword);

    List<News> getAllNews(int page,int limit,String keyword);

    List<News> getAllNewsByCategory(int page,int limit,String keyword);

    List<News> selectAllNewsByTagId(Integer tagId, Integer pageNum);

    int selectAllNewsByTagIdCount(Integer tagId);


    PageResult getNewsPage(PageUtil pageUtil);

    int addNews(News news);

    int updateNews(News news);

    int deleteNews(List<Long>  ids);

    int updateNewsViews(Long newsId);

    List<NewsTag> getHottags();

    List<News> getHotNews();

    List<News> getRecentNews();

    int getNewsCountByCatgeory(String keyword);
}
